<link rel="stylesheet" href="{$BACKEND_CSS}dataTable.css"  rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{$BACKEND_CSS}Form.css"  rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{$BACKEND_CSS}Buttons.css"  rel="stylesheet" type="text/css" />

<script type="text/javascript" src="{$BACKEND_JS}sliding.form.js"></script>

<div id="preview_link" style="display: none;">{$preview_link}</div>
<div  class="clear"> </div>
        <div id="Fcontent">
            <div id="wrapper">
            
                <div id="steps">
                   
                        <form id="pageForm" name="pageForm" method="post" action="{$form_action}">
                        <fieldset class="step" >
                        
                             <legend>
                                {$lang.info}
                                
                                <img id="{$curLanguage.code}" class="flag selected" src="{$curLanguage.icon}" />
                                {foreach from=$languages item=cur}
                                    <img id="{$cur.code}" class="flag" src="{$cur.icon}" />
                                {/foreach}
                            </legend>
                            <div id="formholder" >
                              <div id="{$curLanguage.code}" class="selected_container">
                                  {assign var=cur_code value=$curLanguage.code}
                                  <p id="lang" class='block'>
                                      <label class='text' for="name">{$lang.page_title}&nbsp;{$curLanguage.code}<span style="color: red;">*</span></label>
                                      <input class="lang" id="page_title"  name="title_{$curLanguage.code}" type="text" value="{if isset($pageInfo)} {$pageInfo.title.$cur_code} {/if}" validate='text'  />
                                  </p>
                              </div>
                              {foreach from=$languages item=cur}
                                  <div id="{$cur.code}" class="lang_container" style="display:none;">
                                      {assign var=code value=$cur.code}
                                      <p id="lang" class='block'>
                                          <label class='text' for="name">{$lang.page_title}&nbsp;{$cur.code}<span style="color: red;">*</span></label>
                                          <input class="lang"  name="title_{$cur.code}" type="text" value="{if isset($pageInfo)} {$pageInfo.title.$code} {/if}"  />
                                      </p>
                                  </div>
                              {/foreach}
                              
                              <p class='block'>
                                  <label class='text' >{$lang.page_url}<span style="color: red;">*</span></label>
                                  <input id="page_url" name="url"    type="text"   value="{if isset($pageInfo.url)} {$pageInfo.url} {/if}"  />
                                  <input id="page_id"  name="idPage" type="hidden" value="{if isset($pageInfo.id)}  {$pageInfo.id} {/if}"  />
                              </p>
                              
                              
                              <p class='block'>
                                  <label class='text' >{$lang.admin_page}</label>
                                  <input class="checkbox" name="admin" type="checkbox" {if isset($pageInfo.isAdminPage)} {if $pageInfo.isAdminPage == 1} checked="true"  {/if}  {/if}  />
                              </p>
                              
                              <input type="hidden" name="create" />
                            </div> 
                            <div id="jump"></div>    
                            <div id="formtip">
                                
                                <p class='block'>
                                    <label class='text' >{$lang.keyword}<span style="color: red;">*</span></label>
                                    <input id="edit_class" name="keyword" type="text" {if isset($pageInfo.keyword)} value="{$pageInfo.keyword}" readonly="true" class="disabled" {/if}  />
                                </p>  
                               
                                <div id="buttonPlace">                                
                                     <a style="width:150px;" id="next"  class="large blue button" >{$lang.next_step}</a> 
                                </div>
                                
                                
                            </div>
                         
                        </fieldset>
                       
						            <fieldset class="step" >
                            
                            <legend>{$lang.struct}</legend>
                            
                            
                                
                                	
                            
                            <div id="tableHolder">
                            <div  style="clear:both;"></div>
                                <table border="0" width="100%" cellspacing="0" cellpadding="2">
                                    <tr><td>
                                    <table class="dataTable" border="0" width="100%" cellspacing="0" cellpadding="2">
                                      <thead>
                                      <tr>
                                        <th width="33%">{$lang.settings}</th>
                                        <th width="30%">{$lang.containers}</th>
                                        <th width="37%">{$lang.access}</th>
                                      </tr>
                                      </thead>
                                      <tr>
                                        <td valign="top" width="330px">
                                          <table class="dataTable1" border="0" width="100%" cellspacing="0" cellpadding="0">
                                            <tr style="vertical-align: top;">
                                              <td width="100px" style="vertical-align: top;">{$lang.page_title}</td>
                                              <td>
                                                <input  id="page_title2" disabled="true" class="disabled" value="{if isset($pageInfo)} {$pageInfo.title.$cur_code} {/if}" value=""/>
                                              </td>
                                            </tr>
                                            <tr>
                                              <td>{$lang.page_url}</td>
                                              <td><input type="text" disabled="true" class="disabled" id="page_url2" value="{if isset($pageInfo)} {$pageInfo.url} {/if}"/></td>
                                            </tr>
                                            <tr>
                                              <td>{$lang.Page_group}</td>
                                              <td>
                                                <select id="group_id" name="group_id">           
                                                  <option value="groups">groups</option>
                                                  <option value="groups">groups</option>
                                                  <option value="groups">groups</option>
                                                  <option value="groups">groups</option>      
                                                </select>
                                              </td>
                                            </tr>
                                            <tr>
                                              <td>{$lang.site_map}</td>
                                              <td align="left">
                                                <input type="checkbox" class="checkbox" checked="checked" id="show_in_sitemap" name="show_in_sitemap"/>
                                              </td>
                                            </tr>
                                            <tr>
                                              <td>{$lang.ssl}</td>
                                              <td align="left">
                                                <input type="checkbox" class="checkbox" checked="checked" id="require_ssl" name="require_ssl"/>
                                              </td>
                                            </tr>
                                          </table>
                                        </td>
                                        <td valign="top" width="230px">
                                          <table class="dataTable1" border="0" width="230px" cellspacing="0" cellpadding="2">
                                            <tr>
                                              <td><input  type="checkbox" {if isset($pageInfo)} {if $pageInfo.header == 'enable'} checked="true" {/if} {else} checked="true" {/if}  id="header_check" name="header_check" onclick="updateContainer('header_row', 'header_cont', this.checked)"/></td>
                                              <td>{$lang.header}</td>
                                              <td><input  type="text" id="header_text" name="header_text"/></td>
                                            </tr>
                                            <tr>
                                              <td><input  type="checkbox" {if isset($pageInfo)} {if $pageInfo.cleft == 'enable'} checked="true" {/if} {else} checked="true" {/if} id="left_check" name="left_check" onclick="updateContainer('left_td', 'left_cont', this.checked)"/></td>
                                              <td>{$lang.left}</td>
                                              <td><input  type="text" id="left_text" name="left_text"/></td>
                                            </tr>
                                            <tr>
                                              <td><input type="checkbox" {if isset($pageInfo)} {if $pageInfo.content == 'enable'} checked="true" {/if} {else} checked="true" {/if} id="content_check" name="content_check" onclick="updateContainer('content_td', 'content_cont', this.checked)"/></td>
                                              <td>{$lang.content}</td>
                                              <td><input type="text" id="content_text" name="content_text"/></td>
                                            </tr>
                                            <tr>
                                              <td><input type="checkbox" {if isset($pageInfo)} {if $pageInfo.cright == 'enable'} checked="true" {/if} {else} checked="true" {/if} id="right_check" name="right_check" onclick="updateContainer('right_td', 'right_cont',  this.checked)"/></td>
                                              <td>{$lang.right}</td>
                                              <td><input type="text" id="right_text" name="right_text"/></td>
                                            </tr>
                                            <tr>
                                              <td><input type="checkbox" {if isset($pageInfo)} {if $pageInfo.footer == 'enable'} checked="true" {/if} {else} checked="true" {/if} id="footer_check" name="footer_check" onclick="updateContainer('footer_row', 'footer_cont', this.checked)"/></td>
                                              <td>{$lang.footer}</td>
                                              <td><input type="text" id="footer_text" name="footer_text"/></td>
                                            </tr>
                                          </table>
                                        </td>
                                        <td valign="top">
                                          <table class="dataTable1" border="0" width="100%" cellspacing="0" cellpadding="2">
                                            <tr>
                                              <td >{$lang.is_access_limited}</td>
                                              <td><input type="checkbox" id="is_access_limited" name="is_access_limited" onclick="iPageEditor.showRestriction(this.checked)"/></td>
                                            </tr>
                                            
                                            <tr>
                                              <td>{$lang.logged}</td>
                                              <td>
                                                <input type="checkbox" checked="checked" value="1" id="restrictions_logged" name="restrictions[logged]"/>
                                              </td>
                                            </tr>
                                            </tr>
                                            <tr>
                                              <td>{$lang.prelogged}</td>
                                              <td>
                                                <input type="checkbox" checked="checked" value="1" id="restrictions_prelogged" name="restrictions[logged]"/>
                                              </td>
                                            </tr>
                                            <tr>
                                              <td>{$lang.redirect}</td>
                                              <td>
                                                <select id="page_redirect" name="page_redirect">
                                                
                                                </select>
                                              </td>
                                            </tr>
                                          </table>
                                        </td>
                                      </tr>
                                    </table>
                                    </td></tr></table>
                                    <div  class="clear"> </div>
                                    <div id="block_container">
                                    <table border="0" width="100%" cellspacing="0" cellpadding="2">
                                      <tr>
                                        <td style="vertical-align:top; min-width:640px">
                                          <table class="dataTable" border="0" width="100%" cellspacing="0" cellpadding="2">
                                            <thead>
                                              <tr>
                                                <th colspan="3">{$lang.dash_board}</th>
                                              </tr>
                                            </thead>
                                          </table>
                                          <table class="dataTable" border="0" width="100%" cellspacing="0" cellpadding="2">
                                            <tr id="header_row" {if isset($pageInfo)} {if $pageInfo.header == 'disable'} class="invis" {/if} {/if} >
                                              <td valign="top" colspan="3"><div style="margin-bottom: 5px;"><b>{$lang.header}</b></div>
                                              <div id="header_cont" style="float:left; width:100%; min-height:72px;">
                                                {if isset($pageBlocks.HEADER)}
                                                  {foreach from=$pageBlocks.HEADER item=block}
                                                    <div id="block_{$block.id}" class="dropped"> 
                                                      <b>{$block.title}</b>
                                                      <div class="info">
                                                          <small>( Osipov Stanislav - xBlocksProgect )</small>
                                                      </div>
                                                      <div id="delete_block" onclick="deleteBlock('block_{$block.id}');"></div>
                                                    </div>
                                                  {/foreach}
                                                {/if}
                                                
                                                
                                              </div>
                                              </td>
                                            </tr>
                                            <tr id="content_row">
                                              <td {if isset($pageInfo)} {if $pageInfo.cleft == 'disable'} class="invis" {/if} {/if} valign="top" width="18%" id="left_td"><div style="margin-bottom: 5px;"><b>{$lang.left}</b></div>
                                                <div id="left_cont" style="float:left; width:100%; min-height:200px;">
                                                  {if isset($pageBlocks.LEFT)}
                                                    {foreach from=$pageBlocks.LEFT item=block}
                                                      <div id="block_{$block.id}" class="dropped"> 
                                                        <b>{$block.title}</b>
                                                        <div class="info">
                                                            <small>( Osipov Stanislav - xBlocksProgect )</small>
                                                        </div>
                                                        <div id="delete_block" onclick="deleteBlock('block_{$block.id}');"></div>
                                                      </div>
                                                    {/foreach}
                                                  {/if}
                                                </div>
                                              </td>
                                              <td {if isset($pageInfo)} {if $pageInfo.content == 'disable'} class="invis" {/if} {/if} valign="top" id="content_td"><div style="margin-bottom: 5px;"><b>{$lang.content}</b></div>
                                                <div id="content_cont" style="float:left; width:100%; min-height:240px;" >
                                                  {if isset($pageBlocks.CONTENT)}
                                                      {foreach from=$pageBlocks.CONTENT item=block}
                                                        <div id="block_{$block.id}" class="dropped"> 
                                                          <b>{$block.title}</b>
                                                          <div class="info">
                                                              <small>( Osipov Stanislav - xBlocksProgect )</small>
                                                          </div>
                                                          <div id="delete_block" onclick="deleteBlock('block_{$block.id}');"></div>
                                                        </div>
                                                      {/foreach}
                                                    {/if}
                                                </div>
                                              </td>
                                              <td {if isset($pageInfo)} {if $pageInfo.cright == 'disable'} class="invis" {/if} {/if} valign="top" width="18%" id="right_td"><div style="margin-bottom: 5px;"><b>{$lang.right}</b></div>
                                                <div id="right_cont" style="float:left; width:100%; min-height:200px">
                                                  {if isset($pageBlocks.RIGHT)}
                                                      {foreach from=$pageBlocks.RIGHT item=block}
                                                        <div id="block_{$block.id}" class="dropped"> 
                                                          <b>{$block.title}</b>
                                                          <div class="info">
                                                              <small>( Osipov Stanislav - xBlocksProgect )</small>
                                                          </div>
                                                          <div id="delete_block" onclick="deleteBlock('block_{$block.id}');"></div>
                                                        </div>
                                                      {/foreach}
                                                    {/if}
                                                </div>
                                              </td>
                                            </tr>
                                            <tr id="footer_row" {if isset($pageInfo)} {if $pageInfo.footer == 'disable'} class="invis" {/if} {/if}>
                                              <td valign="top" colspan="3"><div style="margin-bottom: 5px;"><b>{$lang.footer}</b></div>
                                               <div id="footer_cont" style="float:left; width:100%; min-height:73px">
                                                 {if isset($pageBlocks.FOOTER)}
                                                      {foreach from=$pageBlocks.FOOTER item=block}
                                                        <div id="block_{$block.id}" class="dropped"> 
                                                          <b>{$block.title}</b>
                                                          <div class="info">
                                                              <small>( Osipov Stanislav - xBlocksProgect )</small>
                                                          </div>
                                                          <div id="delete_block" onclick="deleteBlock('block_{$block.id}');"></div>
                                                        </div>
                                                      {/foreach}
                                                  {/if}
                                               </div>
                                              </td>
                                            </tr>
                                          </table>
                                        </td>
                                        <td style="padding-left:2px; vertical-align:top; width:200px;">
                                           <table class="dataTable" border="0" width="100%" cellspacing="0" cellpadding="2">
                                            <thead>
                                              <tr>
                                                <th>{$lang.block_list}</th>
                                              </tr>
                                            </thead>
                                            <tr>
                                              <td style="padding-left: 0px">
                                                
                                                    <div style="width:100%; overflow-y: scroll; height:470px;">
                                                    
                                                    <table cellpadding="8" cellspacing="8">
                                        
                                                    {foreach from=$blocks item=block}
                                                      <tr id="{$block.id}">
                                                        <td style="border:0px; padding-left: 0px">
                                                          <div class="dragableBox" id="block_{$block.id}" style="width:150px; height:48px; font-size:10px">
                                                            <b>{$block.title}</b>
                                                            <div class="info">
                                                                <small>(Osipov Stanislav - xBlocksProgect)</small>
                                                            </div>
                                                          </div>
                                                        </td>
                                                      </tr>
                                                    {/foreach}
                                                    </table>
                                                    </div>
                                                
                                              </td>
                                            </tr>
                                          </table>
                                        </td>
                                      </tr>
                                    </table>
                                    </div>
                            </div>
                            <div id="buttonsL">
                                <a style="width:150px;" class="large green button" id="save">{$lang.save}</a> 
                                <a style="width:150px;" class="large green button" id="apply">{$lang.apply}</a> 
                                <a style="width:150px;" class="large green button" id="preview">{$lang.preview}</a> 
							</div>
                            
                            <div id="buttonsR">
                                <a style="width:170px;" href="{$pages_list}" class="large blue button" >{$lang.back_to_pages}</a> 
							</div>
                      
                        </fieldset>
                         </form>
                        <fieldset class="step" style="height:325px;">
                        <form>
                            <legend>{$lang.help}</legend>
                            
							<p class='block'>
								Some help
							</p>
                        </form>
                        </fieldset>
                        
                </div>
                <div id="navigation" style="display:none;">
                    <ul>
                        <li class="selected">
                            <a href="#">{$lang.info}</a>
                        </li>
                        <li>
                            <a href="#">{$lang.struct}</a>
                        </li>
                        <li>
                            <a href="#">{$lang.help}</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        
      </div>
  
</div>